package com.supermap.protocol;
import java.io.Serializable;

/**
 * @author liqs
 * @version 1.0
 * @date 2020/12/28 17:55
 * 传输响应对象
 */
public class RpcResponse implements Serializable{

    private static final long serialVersionUID = -4546652381492921069L;

    private String message;
    private String infoPurposes;
    // 0=success  -1=fail -2=success && shutdown
    private int status;
    private byte[] hashId;
    private String ipfsIp;
    private String ipfsPort;
    private String publicKey;
    private String error;

    public String getInfoPurposes() {
        return infoPurposes;
    }

    public void setInfoPurposes(String infoPurposes) {
        this.infoPurposes = infoPurposes;
    }

    public byte[] getHashId() {
        return hashId;
    }

    public void setHashId(byte[] hashId) {
        this.hashId = hashId;
    }

    public String getIpfsIp() {
        return ipfsIp;
    }

    public void setIpfsIp(String ipfsIp) {
        this.ipfsIp = ipfsIp;
    }

    public String getIpfsPort() {
        return ipfsPort;
    }

    public void setIpfsPort(String ipfsPort) {
        this.ipfsPort = ipfsPort;
    }

    public String getPublicKey() {
        return publicKey;
    }

    public void setPublicKey(String publicKey) {
        this.publicKey = publicKey;
    }

    public String getError() {
        return error;
    }

    public void setError(String error) {
        this.error = error;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String msg) {
        this.message = msg;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "RpcResponse{" + "id ='" + message + '\'' + ", datasource =" + infoPurposes + ", status=" + status + '}';
    }
}
